package com.ocean.redflagtest.mvvm.models.sql

import android.arch.lifecycle.LiveData
import android.arch.persistence.room.Dao
import android.arch.persistence.room.Delete
import android.arch.persistence.room.Insert
import android.arch.persistence.room.Query

import com.ocean.redflagtest.mvvm.base.BaseDao
import com.ocean.redflagtest.mvvm.models.entity.OriginalModel

/**
 * Created by ocean on 2018/8/2
 * Author :  ocean
 * Email  :  348686686@qq.com
 */

@Dao
interface OriginalModelDao {

    @get:Query("SELECT * FROM red_flag")
    val allOriginals: LiveData<List<OriginalModel>>

    @Insert
    fun insertAll(originalModels: List<OriginalModel>)

    @Query("DELETE FROM red_flag")
    fun deleteAll()

}
